1. Technical Field
The present invention relates to a disk storage device which searches for a defective sector on the disk and reassigns an alternate sector in advance, and a method for processing the defective sector in such a disk storage device.
2. Description of the Related Art
In recent years, as the capacity of the disk storage device (disk storage) has been increased, dynamic image and sound are increasingly becoming stored in the disk storage device in an AV (Audio Visual) applications. In such an application, for real time input and output of the dynamic image and sound, it is required to define a lower limit value of the throughput of the storage, that is, to define a limit of its instantaneous performance degradation. However, in the conventional disk storage devices designed primarily to store static data, the average values of their throughput may be compared, but their instantaneous performance degradation is not taken into account. Therefore, when an error actually occurs, retries are executed as many times as possible to recover from the error. Then, when the number of retries reaches a predetermined number, it is decided that the sector is a defective sector, and reassignment of the defective sector is carried out.
However, in the above described AV application, retries extending over a long time result in pause of the image and dropout of the sound, and therefore cannot be accepted. Also, the devices are in the waiting state in the conventional disk storage devices unless being accessed from a host. Furthermore, because the reassignment of the defective sector is carried out when an error occurs during access from a host, depending on the number of retries, it may be a contributing factor of the instantaneous performance degradation. Furthermore, write errors are often associated with the servo system, and the occurrence of such errors in the servo system results in reassignments of the sector in which the error occurred as well as a plurality of subsequent sectors. Thus, many sectors are reassigned at a time, and this also greatly affects the instantaneous performance.
An object of the present invention is to provide a disk storage device which can overcome the above described problems and avoid the instantaneous performance degradation as much as possible, and a method for processing a defective sector in such a disk storage device.
A method for processing a defective sector in a disk storage device according to the present invention comprises the steps of: executing a predetermined check related to a function of the disk storage device, preferably at least one of a read test, write servo test, and write test, when the disk storage device is in a waiting state where the disk storage device has no access from a host. Thereby, the read test and write servo test are to search for a defective sector on the disk and reassign the defective sector, and the write test is to indicate the abnormal condition of the head.
According to the present invention, the waiting state of the disk storage device during which it has no access from a host is utilized to execute during that time the predetermined check, preferably the read test, write servo test, and write test, to reassign the defective sector and to ascertain the status of the head in advance. The probability that the reassignment will occur when the data is actually accessed by a host command can be reduced, and the performance degradation can be prevented.
In the preferred embodiment of the present invention, it is contemplated that (1) if a host command is generated when each test is being executed, the test which is being executed is suspended, and the generated host command is given a priority and executed, (2) the disk storage device is provided with a register, in which the position of the sector which is accessed for the check currently being executed is stored, and the position is sequentially updated as the check proceeds, and wherein (a) the content of the register is stored in the disk when a predetermined time has elapsed after the supply of the command from the host stopped, so that the value of the accessed sector can be recovered even after the power is shut off and the content of the register is cleared, or (b) when a host command is provided during a check, the value of the accessed sector which is to be accessed to restart the check can be recovered by the content of the register, and that (3) the disk storage device is provided with a mode flag, in which the type of the test currently being executed is stored. In either case, the above described processing of the defective sector of the present invention may be executed.
Furthermore, the disk storage device according to the present invention comprises means for detecting that the disk storage device is in the waiting state, and means for executing a predetermined check related to a function of the disk storage device, preferably at least one of the read test, write servo test, or write test, in response to the detecting means.